package com.zyc.app.woa.data;

import com.zyc.app.woa.db.ArticlesTable;

import java.io.Serializable;

/**
 * Author: yingchang.zhang
 * Date  : 2014/12/18
 */
public class CachedArticle extends ArticleItem implements Serializable {
    public long cachedTime;
    public String wxId;
    public String cacheFile;
    public long readTime;
    public int read;
    public int favorite;

    public CachedArticle() {

    }

    public CachedArticle(ArticleItem articleItem) {
        this.title = articleItem.title;
        this.url = articleItem.url;
        this.imgLink = articleItem.imgLink;
        this.headImage = articleItem.headImage;
        this.pageSize = articleItem.pageSize;
    }

    public boolean isFavorite() {
        return favorite == ArticlesTable.COLUMN_VALUE_FAVORITE;
    }

    public boolean isReaded() {
        return read == ArticlesTable.COLUMN_VALUE_READ;
    }

}
